<?php
/**

 //  The DoYouHaoBaby PHP FrameWork - time
 //  +---------------------------------------------------------------------
 //
 //  “Copyright”
 //  +---------------------------------------------------------------------
 //	 | (C) 2010 - 2011 http://doyouhaobaby.net All rights reserved.
 //	 | This is not a free software, use is subject to license terms
 //  +---------------------------------------------------------------------
 //
 //  “About This File”
 //  +---------------------------------------------------------------------
 //	 | time Index控制器
 //  +---------------------------------------------------------------------

*/

!defined('DYHB_PATH') && exit;

class IndexController extends Controller{


	/**
	 * 首页 < 默认访问 >
	 *
	 * @access public
	 * @return void
	 */
    public function index(){
       
	    $oModel  = FormModel::F(); 
    	 
        // 随便进行几个查询，来显示页面的SQL查询记录
        $oModel->all()
			   ->query();

		// 开始捕获错误
		if( $oModel->isError() )
		     $this->E(  $oModel->getErrorMessage() );

        $oModel->getByform_id( 1 );

		// 开始捕获错误
		if( $oModel->isError() )
		     $this->E(  $oModel->getErrorMessage() );

        $oModel->setColumns('form_id,form_title')
			   ->order('`form_id` DESC')
			   ->all()
			   ->query(); 

		// 开始捕获错误
		if( $oModel->isError() )
		     $this->E(  $oModel->getErrorMessage() );

        $this->display();

    }

}
